<template>

  <div>
    <table>
      <tr>
        <th>#</th>
        <th>身高</th>
        <th>体重</th>
        <th>BMI</th>
        <th>操作</th>
      </tr>
      <tr v-if="list.length=== 0">
        <td colspan="5">暂无数据</td>
      </tr>
      <tr v-else v-for="(item, index) of list"
      :key="index"
      >
        <td>{{index + 1}}</td>
        <td>{{ item.height }}</td>
        <td>{{ item.weight }}</td>
        <td>{{ item.bmi }}</td>
        <td>
          <a @click="delItem(item.objectId)" href="javascript:void(0)">删除</a>
        </td>
      </tr>
    </table>
  </div>

</template>

<script>


export default {
name: "BMiDEL",
  props: {
    list: {
      type: Array,
      default: () => []
    },

  },
  data() {
    return {
      id:'',
    }
  },

  methods: {
    delItem(id) {
      this.$emit('delItem', id)

    }
  }

}


</script>

<style scoped>

</style>